<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../../../print.css" type="text/css" media="print">
<meta content="MaterialsList,org.papervision3d.materials.utils.MaterialsList,_materials,materialsByName,numMaterials,addMaterial,clone,getMaterialByName,removeMaterial,removeMaterialByName,toString" name="keywords">
<title>org.papervision3d.materials.utils.MaterialsList</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'MaterialsList - Papervision3D 3dcnapi文档';
				var baseRef = '../../../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">Papervision3D 3dcnapi文档</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../../../all-classes.html')" href="../../../../package-summary.html">全部包</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../../all-classes.html')" href="../../../../class-summary.html">全部类</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../../index-list.html')" href="../../../../all-index-A.html">引索</a>&nbsp;|&nbsp;<a href="../../../../index.html?org/papervision3d/materials/utils/MaterialsList.html&amp;org/papervision3d/materials/utils/class-list.html" id="framesLink1">框架</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">无框架</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="3dcnapi Logo" title="3dcnapi Logo" class="logoImage" src="../../../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">类&nbsp;MaterialsList</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#propertySummary">属性</a>&nbsp;| <a href="#methodSummary">方法</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("类 MaterialsList"); titleBar_setSubNav(false,true,false,false,false,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">包</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">org.papervision3d.materials.utils</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">类</td><td class="classSignature">public class MaterialsList</td>
</tr>
</table>
<p></p>
 The MaterialsList class contains a list of materials.
 <p/><strong>MaterialsList 类功用为包含材质列表</strong> 
 Each MaterialsList object has its own materials list.
 <p><strong>每一个MaterialsList对象都有其自身的材质列表
 <br>
 </strong></p>
 <hr>
</div>
<a name="propertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">公共属性</div>
<table id="summaryTableProperty" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">属性</th><th colspan="2">定义方</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#materialsByName">materialsByName</a> : Dictionary<div class="summaryTableDescription">
  List of materials indexed by name.<strong>索引按名称的材质列表</strong></div>
</td><td class="summaryTableOwnerCol">MaterialsList</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#numMaterials">numMaterials</a> : int<div class="summaryTableDescription">[只读]
  Returns the number of children of this object.<strong>返回对象的子物体的数目</strong></div>
</td><td class="summaryTableOwnerCol">MaterialsList</td>
</tr>
</table>
</div>
<a name="protectedPropertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">保护属性</div>
<table id="summaryTableProtectedProperty" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">属性</th><th colspan="2">定义方</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#_materials">_materials</a> : Dictionary<div class="summaryTableDescription">
  [包内使用] List of materials.<strong>材质列表</strong></div>
</td><td class="summaryTableOwnerCol">MaterialsList</td>
</tr>
</table>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">公共方法</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">方法</th><th colspan="2">定义方</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#MaterialsList()">MaterialsList</a>(materials:* = null)</div>
<div class="summaryTableDescription">
  Creates a list of materials.<strong>创建材质列表</strong></div>
</td><td class="summaryTableOwnerCol">MaterialsList</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#addMaterial()">addMaterial</a>(material:<a href="../../core/proto/MaterialObject3D.html">MaterialObject3D</a>, name:String = null):<a href="../../core/proto/MaterialObject3D.html">MaterialObject3D</a>
</div>
<div class="summaryTableDescription">
  Adds a material to this MaterialsList object.<strong>添加材质到<span class="MainContent">MaterialsList</span>对象</strong></div>
</td><td class="summaryTableOwnerCol">MaterialsList</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#clone()">clone</a>():<a href="../utils/MaterialsList.html">MaterialsList</a>
</div>
<div class="summaryTableDescription">
  Creates a copy of the materials list.<strong>创建材质列表的复本</strong></div>
</td><td class="summaryTableOwnerCol">MaterialsList</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#getMaterialByName()">getMaterialByName</a>(name:String):<a href="../../core/proto/MaterialObject3D.html">MaterialObject3D</a>
</div>
<div class="summaryTableDescription">
  Returns the material that exists with the specified name.<strong>返回指定名称的材质</strong></div>
</td><td class="summaryTableOwnerCol">MaterialsList</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#removeMaterial()">removeMaterial</a>(material:<a href="../../core/proto/MaterialObject3D.html">MaterialObject3D</a>):<a href="../../core/proto/MaterialObject3D.html">MaterialObject3D</a>
</div>
<div class="summaryTableDescription">
  Removes the specified material from the materials list.<strong>删除材质列表中指定的材质</strong></div>
</td><td class="summaryTableOwnerCol">MaterialsList</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#removeMaterialByName()">removeMaterialByName</a>(name:String):<a href="../../core/proto/MaterialObject3D.html">MaterialObject3D</a>
</div>
<div class="summaryTableDescription">
  Removes the material that exists with the specified name.<strong>删除指定名称的材质</strong></div>
</td><td class="summaryTableOwnerCol">MaterialsList</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#toString()">toString</a>():String</div>
<div class="summaryTableDescription">
  Returns a string with the names of the materials in the list.<strong>返回材质列表中材质名称的字符串值</strong></div>
</td><td class="summaryTableOwnerCol">MaterialsList</td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="propertyDetail"></a>
<div class="detailSectionHeader">属性详细信息</div>
<a name="_materials"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">_materials</td><td class="detailHeaderType">属性</td>
</tr>
</table>
<div class="detailBody">
<code>protected var _materials:Dictionary</code><p>
  [包内使用] List of materials.
    <strong>材质列表</strong></p>
</div>
<a name="materialsByName"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">materialsByName</td><td class="detailHeaderType">属性</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public var materialsByName:Dictionary</code><p>
  List of materials indexed by name.
    <strong>索引按名称的材质列表</strong></p>
</div>
<a name="numMaterials"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">numMaterials</td><td class="detailHeaderType">属性</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>numMaterials:int</code>&nbsp;&nbsp;[只读]<p>
  Returns the number of children of this object.
    <strong>返回对象的子物体的数目</strong></p>
<span class="label">实现</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get numMaterials():int</code>
<br>
</div>
<a name="constructorDetail"></a>
<div class="detailSectionHeader">构造函数详细信息</div>
<a name="MaterialsList()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">MaterialsList</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">构造函数</td>
</tr>
</table>
<div class="detailBody">
<code>public function MaterialsList(materials:* = null)</code><p>
  Creates a list of materials.
    <strong>创建材质列表</strong></p>
<span class="label">参数</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">materials</span>:*</code> (default = <code>null</code>)<code></code> &mdash; An array or name indexed object with materials to populate the list with.
  </td>
</tr>
</table>
</div>
<a name="methodDetail"></a>
<div class="detailSectionHeader">方法详细信息</div>
<a name="addMaterial()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">addMaterial</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">方法</td>
</tr>
</table>
<div class="detailBody">
<code>public function addMaterial(material:<a href="../../core/proto/MaterialObject3D.html">MaterialObject3D</a>, name:String = null):<a href="../../core/proto/MaterialObject3D.html">MaterialObject3D</a></code><p>
  Adds a material to this MaterialsList object.
    <span class="summaryTableDescription"><strong>添加材质到MaterialsList对象</strong></span></p>
<span class="label">参数</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td width="1531"><code><span class="label">material</span>:<a href="../../core/proto/MaterialObject3D.html">MaterialObject3D</a></code> &mdash; The material to add.
  </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20"></td>
<td><code><span class="label">name</span>:String</code> (default = <code>null</code>)<code></code> &mdash;  An optional name of the material. If no name is provided, the material name will be used.
  <strong>自定义的材质名称，如果不提供名称，材质将用此名称</strong></td>
</tr>
</table>
<p></p>
<span class="label">返回</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td>
<td width="940"><code><a href="../../core/proto/MaterialObject3D.html">MaterialObject3D</a></code> &mdash; 
                        The material you have added.
  
                        
                     你已经添加的材质</td>
</tr>
</table>
</div>
<a name="clone()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">clone</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">方法</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function clone():<a href="../utils/MaterialsList.html">MaterialsList</a></code><p>
  Creates a copy of the materials list.
    <strong>创建材质列表的复本</strong></p>
<p></p>
<span class="label">返回</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td>
<td width="1512"><code><a href="../utils/MaterialsList.html">MaterialsList</a></code> &mdash; 
                        A newly created materials list that contains a duplicate of each of its materials.
  
                        
                     新创建的包含每一个材质的复本的材质列表</td>
</tr>
</table>
</div>
<a name="getMaterialByName()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">getMaterialByName</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">方法</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function getMaterialByName(name:String):<a href="../../core/proto/MaterialObject3D.html">MaterialObject3D</a></code><p>
  Returns the material that exists with the specified name.
    <strong>返回指定名称的材质</strong></p>
  </p><span class="label">参数</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">name</span>:String</code> &mdash; The name of the material to return.
  </td>
</tr>
</table>
<p></p>
<span class="label">返回</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code><a href="../../core/proto/MaterialObject3D.html">MaterialObject3D</a></code> &mdash; 
                        The material with the specified name.
  
                        
                     </td>
</tr>
</table>
</div>
<a name="removeMaterial()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">removeMaterial</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">方法</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function removeMaterial(material:<a href="../../core/proto/MaterialObject3D.html">MaterialObject3D</a>):<a href="../../core/proto/MaterialObject3D.html">MaterialObject3D</a></code><p>
  Removes the specified material from the materials list.
    <strong>删除材质列表中指定的材质</strong></p>
<span class="label">参数</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">material</span>:<a href="../../core/proto/MaterialObject3D.html">MaterialObject3D</a></code> &mdash; The material to remove.
  </td>
</tr>
</table>
<p></p>
<span class="label">返回</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code><a href="../../core/proto/MaterialObject3D.html">MaterialObject3D</a></code> &mdash; 
                        The material you have removed.
  
                        
                     </td>
</tr>
</table>
</div>
<a name="removeMaterialByName()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">removeMaterialByName</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">方法</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function removeMaterialByName(name:String):<a href="../../core/proto/MaterialObject3D.html">MaterialObject3D</a></code><p>
  Removes the material that exists with the specified name.
    <strong>删除指定名称的材质</strong></p>
  <p>The material object is garbage collected if no other references to the material exist.
  </p>
    The garbage collector is the process by which Flash Player reallocates unused memory space. When a variable or object is no longer actively referenced or stored somewhere, the garbage collector sweeps through and wipes out the memory space it used to occupy if no other references to it exist.
    </p>
    </p>
  <p><strong>如果没有得到引用，材质对象就会被内存垃圾采集所采集，内存垃圾采集是Flash Player用来重新定位不使用的内存空间的处理进程，当变量或对象不再被引用时，内存垃圾采集就会释放掉这些不再需要的内存空间。</strong></p>
  <p>
    </p>
    <span class="label">参数</span>
  </p>
  <table width="1095" border="0" cellpadding="0" cellspacing="0">
    <tr>
      <td width="20px"></td>
      <td><code><span class="label">name</span>:String</code> &mdash; The name of the material to remove. 要删除的材质名称</td>
    </tr>
  </table>
  <p></p>
<span class="label">返回</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td>
<td width="1086"><code><a href="../../core/proto/MaterialObject3D.html">MaterialObject3D</a></code> &mdash; 
                        The material object that was removed.
  
                        
                     已经删除的材质对象</td>
</tr>
</table>
</div>
<a name="toString()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">toString</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">方法</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function toString():String</code><p>
  Returns a string with the names of the materials in the list.
    <strong>返回材质列表中材质名称的字符串值</strong></p>
<p></p>
<span class="label">返回</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>String</code> &mdash; A string.
  </td>
</tr>
</table>
</div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright">http://blog.papervision3d.org</center>
</div>
</body>
</html>
<!--http://blog.papervision3d.org-->
